package chixing.day18.work;

public class Mmain {

    public static void main(String[] args) {
        Storage storage = new Storage();
        Thread p1 = new Thread(new Producer(storage));
        Thread p2 = new Thread(new Producer(storage));
        Thread p3 = new Thread(new Producer(storage));

        Thread c1 = new Thread(new Consumer(storage));
        Thread c2 = new Thread(new Consumer(storage));
        Thread c3 = new Thread(new Consumer(storage));
        Thread c4 = new Thread(new Consumer(storage));
        Thread c5 = new Thread(new Consumer(storage));
        Thread c6 = new Thread(new Consumer(storage));
        Thread c7 = new Thread(new Consumer(storage));
        Thread c8 = new Thread(new Consumer(storage));
        Thread c9 = new Thread(new Consumer(storage));
        Thread c10 = new Thread(new Consumer(storage));

        p1.start();
        p2.start();
        p3.start();
        c1.start();
        c2.start();
        c3.start();
        c4.start();
        c5.start();
        c6.start();
        c7.start();
        c8.start();
        c9.start();
        c10.start();
    }
}

